/* 
 * File:   basebuffer.h
 * Author: marcell
 *
 * Created on 28. Februar 2011, 12:11
 */

#ifndef BASEBUFFER_H
#define	BASEBUFFER_H


#include <GL/glew.h>

#include "glmmiindexbuffer.h"
#include "glmmivertexbuffer.h"
#include "glmmusage.h"

class VertexBufferObjectGL15 : public glmmIVertexBuffer, public glmmIIndexBuffer
{
private:
    GLuint name;
    
    GLenum target;
    
    GLMMDATATYPE type;

public:
    VertexBufferObjectGL15(bool isIndexBuffer, GLMMDATATYPE type);
    ~VertexBufferObjectGL15();

    GLMMRESULT PrepareData(unsigned size, GLMMUSAGE usage);

    virtual GLMMRESULT Lock(GLMMLOCK lock, void** data);

    virtual GLMMRESULT Unlock();
    
    virtual GLMMDATATYPE GetDataType () const;
    
    virtual int GetName () const;
    virtual int GetType () const;
    virtual GLMMRESULT Bind ();
    

};



#endif	/* BASEBUFFER_H */

